package com.csun.base;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @ClassName: BaseAction.java
 * @Description:TODO
 * @author danjinsong danjingsong@dragonwake.cn
 * @date 2017年2月16日上午11:59:59
 * 
 */
@SuppressWarnings("serial")		//未序列化
public class BaseAction extends ActionSupport 
	implements ServletRequestAware,ServletResponseAware{
	
	private HttpServletRequest requset;
	
	private HttpServletResponse response;

	//=============从此处开始为业务逻辑方法 ======================//

	
	//=============从此处开始为中间调用方法 ======================//
	
	
	//=============从此处开始为 Get Set方法====================//
	/**
	 * 返回 session
	 * @return
	 */
	public HttpSession getSession(){
		return this.requset.getSession();
		
	}
	/**
	 * 返回 request
	 * @return
	 */
	public HttpServletRequest getRequset(){
		return this.requset;
	}
	/**
	 * 返回 response
	 * @return
	 */
	public HttpServletResponse getresponse(){
		return this.response;
	}
	
	@Override
	public void setServletRequest(HttpServletRequest requset) {
		this.requset = requset;
	}

	@Override
	public void setServletResponse(HttpServletResponse response) {
		this.response = response;
	}
}
